﻿using Microsoft.Toolkit.Uwp.Notifications;
using System;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Xml;
using WpfNet8Test.Model;
using WpfNet8Test.ViewModel;
using WpfNet8Test.ZEFcore;
using WpfNet8Test.ZStatic;

namespace WpfNet8Test
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {

        private readonly AppDbContext _context;

        private bool _isDataDirty;

        public MainWindow()
        {
            InitializeComponent();

            _context = new AppDbContext();

        }

      

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                new ToastContentBuilder()
                    .AddText("CodeMissing发来一条消息") // 标题文本
                    .AddText("请检查消息内容，并及时处理")
                    .Show(); // 7.0以上才提供Show方法

                //MessageBox.Show("通知已发送！", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
            }
            catch (Exception ex)
            {
                MessageBox.Show($"发送通知失败: {ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
            }

        }

    }
}